package cn.calm.swing.osgi.file.exit.ui;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JMenuItem;

import cn.calm.swing.osgi.api.DefaultMenuService;

public class ExitMenuService extends DefaultMenuService{
	JMenuItem menu=new JMenuItem("Exit");
	public ExitMenuService() {
		menu.addActionListener(new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				System.exit(0);
			}
		});
	}
	@Override
	public JMenuItem getMenu() {
		return menu;
	}
	
	@Override
	public int getIndex() {
		return 1000;
	}
}
